<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html>
<html>
<head>
    <%--常量--%>
    <%@ include file="/common/constHead.jsp"%>
    <%--jQuery--%>
    <%@ include file="/common/jqueryHead.jsp"%>
    <%--jo--%>
    <%@ include file="/common/joHead.jsp"%>
    <%--bootstrap和字体--%>
    <%@ include file="/common/bootstrapHead.jsp"%>
    <%--layer--%>
    <%@ include file="/common/layerHead.jsp"%>
    <%--公共--%>
    <%@ include file="/common/commonHead.jsp"%>
    <%--日期选择--%>
    <%--<%@ include file="/common/dateHead.jsp"%>--%>
    <script src="<%=URL_STATIC%>static/js/laydate/laydate.js"></script>
    <title>自然保护地历年来旅游信息详情表表单</title>
    <script type="text/javascript">
        //获取传递参数
        var reserveId = jo.getUrlParam("reserveId");
        $(function(){
            var jParams = {
                "PKName" : "id",//主键属性名
                "saveAfter" : "toEdit",
                "addUrl" : "travel/reserveCount/insert.action",//新增
                "deleteUrl" : "travel/reserveCount/delete.action",//删除
                "updateUrl" : "travel/reserveCount/update.action",//修改
                "formDataUrl" : "travel/reserveCount/get.action"	//查询
            };
            joForm.initFormPage(jParams);//初始化
            $("#reserveId").val(reserveId);
        });
        //初始化表单值前处理
        joForm.initFormValueBefore = function(oJson){
            //oJson.year = jo.formatDate(oJson.year);
        };
    </script>
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-xs-12">
            <!--按钮栏-->
            <div class="form-group button-bar">
                <button type="button" isShow="joForm.isAdd" class="btn btn-sm btn-outline btn-default" onclick="joForm.save()">
                    <i class="fa fa-plus-circle" aria-hidden="true"></i>&nbsp;新增
                </button>
                <button type="button" isShow="!joForm.isAdd" class="btn btn-sm btn-outline btn-default" onclick="joForm.update()">
                    <i class="fa fa-pencil-square" aria-hidden="true"></i>&nbsp;修改
                </button>
                <button type="button" isShow="!joForm.isAdd" class="btn btn-sm btn-outline btn-default" onclick="joForm.del()">
                    <i class="fa fa-trash" aria-hidden="true"></i>&nbsp;删除
                </button>
            </div>
            <!--按钮栏-->
        </div>
    </div>
    <div class="row">
        <div class="col-xs-12">
            <form id="pageForm" name="pageForm" action="" method="post">
                <table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
                    <tr>
                        <td width="15%" class="active " align="">旅游人次</td>
                        <td class="tnt">
                            <input type="text"   name="touristNum" class="form-control input-sm "  />
                        </td>
                        <td width="15%" class="active " align="">旅游收入</td>
                        <td class="tnt">
                            <input type="text"   name="touristIncome" class="form-control input-sm "  />
                        </td>
                    </tr>
                    <tr>
                        <td width="15%" class="active " align="">饭店数量</td>
                        <td class="tnt">
                            <input type="text"   name="hotelNum" class="form-control input-sm "  />
                        </td>
                        <td width="15%" class="active " align="">饭店床位数</td>
                        <td class="tnt">
                            <input type="text"   name="hotelBedNum" class="form-control input-sm "  />
                        </td>
                    </tr>
                    <tr>
                        <td width="15%" class="active " align="">住宿收入</td>
                        <td class="tnt">
                            <input type="text"   name="sleepIncome" class="form-control input-sm "  />
                        </td>
                        <td width="15%" class="active " align="">餐位数</td>
                        <td class="tnt">
                            <input type="text"   name="eatNum" class="form-control input-sm "  />
                        </td>
                    </tr>
                    <tr>
                        <td width="15%" class="active " align="">餐饮收入</td>
                        <td class="tnt">
                            <input type="text"   name="eatIncome" class="form-control input-sm "  />
                        </td>
                        <td width="15%" class="active " align="">销售收入</td>
                        <td class="tnt">
                            <input type="text"   name="specIncome" class="form-control input-sm "  />
                        </td>
                    </tr>
                    <tr>
                        <td width="15%" class="active must" align="" >年份</td>
                        <td class="tnt" colspan="3">
                            <input type="text" id="year" name="year" class="form-control input-sm " ErrEmpty />
                            <input type="hidden" id="reserveId" name="reserveId" value=""/>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<script src="<%=URL_STATIC%>static/plugin/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script type="text/javascript">
    laydate.render({
        elem: '#year',
        type:'year'
    });
    jo.formatUI();//格式化jo组件
</script>
</body>
</html>
